-- GENERATED SPELL FOR [Mageslayer] --


function spell0_18866(pUnit, Event) --@Blink,Self--
pUnit:FullCastSpellOnTarget(36097,pUnit)
pUnit:RegisterEvent('Sorts_18866', 1281, 1)
end

function spell1_18866(pUnit, Event) --@Spell Reflection,Self--
pUnit:FullCastSpellOnTarget(36096,pUnit)
pUnit:RegisterEvent('Sorts_18866', 8268, 1)
end

function Sorts_18866(pUnit, Event)
local choix_sorts_18866 = math.random(0, 1)
if choix_sorts_18866 == 0 then
pUnit:RegisterEvent('spell0_18866', 1, 1)
end
if choix_sorts_18866 == 1 then
pUnit:RegisterEvent('spell1_18866', 1, 1)
end
end

function mob18866_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18866', math.random(1500, 3000), 1)
end

function mob18866_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18866_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18866_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18866, 1, 'mob18866_Action')
RegisterUnitEvent(18866, 2, 'mob18866_Leave')
RegisterUnitEvent(18866, 3, 'mob18866_Kill')
RegisterUnitEvent(18866, 4, 'mob18866_Die')
